class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception

  before_action :set_station

  protected

  def set_station
    session[:station] = params[:station] if params[:station]
    station = session[:station] || 'gz'
    @conn_analytics = "#{station}_analytics".to_sym
    @conn_recommend = "#{station}_recommend".to_sym
  end
end
